﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web.Mvc;

namespace Microhard.Framework.MVCHelper
{

    public interface IScriptableComponent
    {
        /// <summary>
        /// 控件Key
        /// </summary>
        string AssetKey { set; get; }
        /// <summary>
        /// 关联的Grid ID
        /// </summary>
        string GridID { set; get; }
        /// <summary>
        /// 控件ID
        /// </summary>
        string ID { set; get; }
        /// <summary>
        /// 传递给Action的参数以及值
        /// Key Action参数名称
        /// Value 值
        /// </summary>
        Dictionary<string, string> PassToActionValues{ set; get; }
        /// <summary>
        /// 需要注册的JS脚本
        /// </summary>
        /// <returns></returns>
        string WriteJQueryReadyInnerScript();
        /// <summary>
        /// 需要注册的JS脚本,在JQueryReady外部
        /// </summary>
        /// <returns></returns>
        string WriteJQueryReadyOutterScript();
        /// <summary>
        /// 生成的HTML
        /// </summary>
        /// <param name="helper"></param>
        /// <param name="linkText"></param>
        /// <param name="actionName"></param>
        /// <param name="controllerName"></param>
        /// <returns></returns>
        MvcHtmlString WriteHtml(HtmlHelper helper, string linkText, string actionName, string controllerName);
    }
}
